<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=<device-width>, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let aa = 10;
        console.log(typeof aa);
        aa = "zhangsna";
        console.log(typeof aa);
        aa = true;
        console.log(typeof aa);
        let bb ;
        console.log(typeof bb);
        bb = null;
        console.log(typeof bb);

        let cc = '10';
        let dd = 10;
        console.log("cc==dd:" + (cc==dd));
        console.log("cc===dd:" + (cc===dd))

        //数组
        let arr = [];
        console.log(arr.length);
        arr[0] = 0;
        arr[1] = 1;
        console.log(arr);
        let arr2 = new Array();
        let arr3 = [1,2,'hello',false];
        console.log(arr3);
        arr3[1] = 99;
        arr3[4] = 'world';
        console.log(arr3);
        arr3.splice(2,2);
        console.log(arr3);

        //函数
        function add(x,y){
            return x+y;
        }
        function add2(x,y){
            console.log(x + y);
            return;
        }
        console.log(add(2,3));
        add2(4,5);

        let aa2 = function(x,y){
            console.log(x*y);
        }
        aa2(3,4);

        //对象
        let aa3 = {};
        aa3.name = 'kiku';
        aa3.age = 31;
        console.log(aa3)

        let aa4 = {
            "name":'haha',
            "age":23
        }
        console.log(aa4);
        aa4.name = 'lisi';
        aa4["age"] = 18;
        aa4.gender = "男";
        console.log(aa4);

    </script>
</body>
</html>